import {Directive, HostListener} from '@angular/core';
import {NavController, NavParams} from 'ionic-angular';

import{HelloPage} from '../../pages/hello/hello';

/**
 * Generated class for the GoSearchPageDirective directive.
 *
 * See https://angular.io/docs/ts/latest/api/core/index/DirectiveMetadata-class.html
 * for more info on Angular Directives.
 */
@Directive({
  selector: '[go-search-page]' // Attribute selector
})
export class GoSearchPageDirective {

  constructor(public navCtrl: NavController,
              public navParams: NavParams) {
    console.log('Hello GoSearchPageDirective Directive');
  }

  @HostListener('click')
  onClick() {
    console.info('[go-search-page]');
    // console.dir('[go-search-page]');
    this.navCtrl.push(HelloPage);
  }

}
